const Timestamp = new Date().getTime();
module.exports = {
    publicPath:  "",
    devServer: {
        proxy: {
            '/api': {
                target: 'http://xs.215000.com',
                changeOrigin: true,
                pathRewrite: {
                    '^/api': ''
                }
            }
        }
    },
  
    // publicPath: '//novel-h5-ixcc.oss-cn-shanghai.aliyuncs.com/web',
    lintOnSave: true,
    filenameHashing: true,
    css: {
        loaderOptions: {
            postcss: {
                plugins: [
                    require('postcss-pxtorem')({
                        rootValue: 32, // 换算的基数
                        selectorBlackList: ['van'], // 忽略转换正则匹配项
                        propList: ['*'],
                    }),
                ]
            }
        }
    },
    configureWebpack: { // webpack 配置
        output: { // 输出重构  打包编译后的 文件名称  【模块名称.版本号.时间戳】
            filename: `js/[name].${process.env.VUE_APP_Version}.${Timestamp}.js`,
            chunkFilename: `js/[name].${process.env.VUE_APP_Version}.${Timestamp}.js`
        },
        // devtool: 'source-map'
        // output: {
        //     // 自定义文件名规则
        //     filename: '[name].[contenthash].js',
        //     chunkFilename: '[name].[contenthash].js'
        // }
    },
}
